<?php

require_once 'db.php';
class work extends DB{
     public function works(){
        $this->getConnection();
        $query = 'SELECT * FROM works ';
        $work = $this->query($query);
        return $work;
}
public function select($page) {
    
     $begin=($page-1)*PER_PAGE;
        $query = "SELECT * FROM works LIMIT $begin".",".PER_PAGE;
        var_dump($query);
        $works = $this->query($query);
        return $works;
    }

     }

